
#include "S_3_FanControl_doChange.h"
#include "property_decoder.h"
#include "spec.h"

void P_3_2_FanLevel_doChange(int newValue)
{
	property_value_t thiz;
    memset(&thiz,0,sizeof(thiz));
#if 	PROPERTY_TYPE
	property_value_new_integer(&thiz,newValue);
#else	
    thiz.format = PROPERTY_FORMAT_NUMBER;
	thiz.data.number.type = DATA_NUMBER_INTEGER;
	thiz.data.number.value.integerValue = newValue;
#endif		
	
	if (send_property_changed(3, 2, &thiz) != MIIO_OK)
    {
        LOG_INFO("%s:send_property_changed failed!\n",__func__);
    }
}


void P_3_3_HorizontalSwing_doChange(bool newValue)
{
	property_value_t thiz;
    memset(&thiz,0,sizeof(thiz));
#if 	PROPERTY_TYPE
	property_value_new_boolean(&thiz,newValue);
#else	
    thiz.format = PROPERTY_FORMAT_BOOLEAN;
    thiz.data.boolean.value = newValue;
#endif		
	
    if (send_property_changed(3, 3, &thiz) != MIIO_OK)
    {
        LOG_INFO("%s:send_property_changed failed!\n",__func__);
    }
}


void P_3_4_VerticalSwing_doChange(bool newValue)
{
	property_value_t thiz;
    memset(&thiz,0,sizeof(thiz));
#if 	PROPERTY_TYPE
	property_value_new_boolean(&thiz,newValue);
#else	
    thiz.format = PROPERTY_FORMAT_BOOLEAN;
    thiz.data.boolean.value = newValue;
#endif		
	
    if (send_property_changed(3, 4, &thiz) != MIIO_OK)
    {
        LOG_INFO("%s:send_property_changed failed!\n",__func__);
    }
}

void P_3_24_WindSensation_doChange(bool newValue)
{
	property_value_t thiz;
    memset(&thiz,0,sizeof(thiz));
#if 	PROPERTY_TYPE
	property_value_new_boolean(&thiz,newValue);
#else	
    thiz.format = PROPERTY_FORMAT_BOOLEAN;
    thiz.data.boolean.value = newValue;
#endif		
	
    if (send_property_changed(3, 24, &thiz) != MIIO_OK)
    {
        LOG_INFO("%s:send_property_changed failed!\n",__func__);
    }
}

void P_3_25_VerticalPosition_doChange(int newValue)
{
	property_value_t thiz;
    memset(&thiz,0,sizeof(thiz));
#if 	PROPERTY_TYPE
	property_value_new_integer(&thiz,newValue);
#else	
    thiz.format = PROPERTY_FORMAT_NUMBER;
	thiz.data.number.type = DATA_NUMBER_INTEGER;
	thiz.data.number.value.integerValue = newValue;
#endif		
	
	if (send_property_changed(3, 25, &thiz) != MIIO_OK)
    {
        LOG_INFO("%s:send_property_changed failed!\n",__func__);
    }
}


void P_3_26_HorizontalPosition_doChange(int newValue)
{
	property_value_t thiz;
    memset(&thiz,0,sizeof(thiz));
#if 	PROPERTY_TYPE
	property_value_new_integer(&thiz,newValue);
#else	
    thiz.format = PROPERTY_FORMAT_NUMBER;
	thiz.data.number.type = DATA_NUMBER_INTEGER;
	thiz.data.number.value.integerValue = newValue;
#endif		
	
	if (send_property_changed(3, 26, &thiz) != MIIO_OK)
    {
        LOG_INFO("%s:send_property_changed failed!\n",__func__);
    }
}


void P_3_11_WindDirection_doChange(int newValue)
{
	property_value_t thiz;
    memset(&thiz,0,sizeof(thiz));
#if 	PROPERTY_TYPE
	property_value_new_integer(&thiz,newValue);
#else	
    thiz.format = PROPERTY_FORMAT_NUMBER;
	thiz.data.number.type = DATA_NUMBER_INTEGER;
	thiz.data.number.value.integerValue = newValue;
#endif		
	
	if (send_property_changed(3, 11, &thiz) != MIIO_OK)
    {
        LOG_INFO("%s:send_property_changed failed!\n",__func__);
    }
}

